package com.zyg.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Builder
@Data
@TableName("sys_role")//按实体类role的名字找表找不到
@NoArgsConstructor
@AllArgsConstructor
public class Role {
    @TableId(value = "role_id",type= IdType.AUTO)/* Can not find table primary key in Class: "com.zyg.pojo.Role".
2024-11-25T09:34:09.643+08:00  WARN 20324 --- [           main] c.b.m.core.injector.DefaultSqlInjector   : class com.zyg.pojo.Role ,Not found @TableId annotation, Cannot use Mybatis-Plus 'xxById' Method.
2024-11-25T09:34:10.074+08:00  INFO 20324 --- [           main] com.zyg.SpringBootWebApplication         : Started SpringBootWebApplication in 2.563 seconds (process running for 3.155)*/
    private Integer roleId;
    private String roleName;
    @TableField(exist = false)
    private Integer[] pIds;
}
